package kr.hyunist.androidcomplete01saeildamil.ch07;

import android.app.*;
import android.content.*;
import android.graphics.*;
import android.os.*;
import android.view.*;

public class NewPaint extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		MyView mv = new MyView(this);
		setContentView(mv);
	}

	class MyView extends View {
		Paint pnt;

		public MyView(Context context) {
			super(context);

			pnt = new Paint(Paint.ANTI_ALIAS_FLAG);
			pnt.setColor(Color.BLUE);
			pnt.setStrokeWidth(10);
			pnt.setStyle(Paint.Style.STROKE);
			pnt.setStrokeJoin(Paint.Join.BEVEL);

		}

		@Override
		protected void onDraw(Canvas canvas) {
			canvas.drawColor(Color.LTGRAY);
			canvas.drawRect(10, 10, 300, 100, pnt);
		}

	}
}
